package com.graduation.smartparkingplatform.Dao;

import com.graduation.smartparkingplatform.Pojo.Region;
import com.graduation.smartparkingplatform.Pojo.Space;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RegionMapper {

  public List<Region> getRegionList();

  public List<Space> spaceByRegion(@Param("regionId") Integer regionId);

  public List<Region> searchRegion(
      @Param("regionName") String regionName, @Param("regionType") String regionType);

  public Boolean addRegion(
      @Param("orgId") Integer orgId,
      @Param("regName") String regName,
      @Param("regType") String regType,
      @Param("regSpaceCount") Integer regSpaceCount,
      @Param("regSpaceRecount") Integer regSpaceRecount,
      @Param("regRemarks") String regRemarks);

  public Boolean changeInfo(
      @Param("regId") Integer regId,
      @Param("orgId") Integer orgId,
      @Param("regName") String regName,
      @Param("regType") String regType,
      @Param("regSpaceCount") Integer regSpaceCount,
      @Param("regSpaceRecount") Integer regSpaceRecount,
      @Param("regRemarks") String regRemarks);

  public Boolean deleteRegion(@Param("regionId") Integer regionId);
}
